package com.lu.model;

/**
 * @program Elasticsearch
 * @description:  es文档更新操作，响应数据解析
 * @author: zhanglu
 * @create: 2020-04-30 09:31:00
 */
public class EsUpdaeDocAction {

    /**
     * _index : ss
     * _type : s
     * _id : AXHIsXZ519NvNolaKFgm
     * _version : 1
     * result : created
     * _shards : {"total":2,"successful":1,"failed":0}
     * created : true
     * status : 201
     */
    private String index;
    private String type;
    private String id;
    private int version;
    private String result;
    private ShardsBean shards;
    private boolean created;
    private int status;

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public ShardsBean getShards() {
        return shards;
    }

    public void setShards(ShardsBean shards) {
        this.shards = shards;
    }

    public boolean isCreated() {
        return created;
    }

    public void setCreated(boolean created) {
        this.created = created;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public static class ShardsBean {
        /**
         * total : 2
         * successful : 1
         * failed : 0
         */

        private int total;
        private int successful;
        private int failed;

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public int getSuccessful() {
            return successful;
        }

        public void setSuccessful(int successful) {
            this.successful = successful;
        }

        public int getFailed() {
            return failed;
        }

        public void setFailed(int failed) {
            this.failed = failed;
        }
    }
}
